<div class="layui-tab-item layui-show">
    <div class="openMaterialDraggable" id="Gallery_{$form.field}">
        <?php if(isset($info) && !empty($info) && $info[$form['field']]){;?>
        <?php $images = explode(',',$info[$form['field']]);?>
        {foreach name="$images" item="vo"}
        <div class="material-preview">
            <div class="del-wrap" >
                <div>
                    <div class="file-item relative"  style="height: auto; width: 240px;">
                        <div class="el-image image">
                            <video src="{$vo}" controls="controls" class="el-image__inner" style="object-fit: contain;">
                                您的浏览器不支持 video 标签。
                            </video>
                        </div>
                    </div>
                </div>
            </div>
            <div class="operation-btns text-xs text-center">
                <span class="openMaterialPreview" data-url="{$vo}">查看</span>
            </div>
        </div>
        {/foreach}
        <input type="hidden" id="checkGallery_{$form.field}" name="{$form.field}" value="{$info[$form['field']]}"/>
        <?php }?>
    </div>
    <div class="upload-btn openGallery" data-t="2" data-n="{$form.field}" data-c="{$form.value}" style="width: 100px; height: 100px;">
        <i class="layui-icon layui-icon-addition" style="font-size: 25px; --color: inherit;"></i>
        <span>添加</span>
    </div>
</div>

<script id="GalleryTemplate2" type="text/html">
    {{# for(var i=0;i<d.data.length ;i++){ }}
    <div class="material-preview">
        <div class="del-wrap" >
            <div>
                <div class="file-item relative" style="height: auto; width: 240px;">
                    <div class="el-image image">
                        <video src="{{d.data[i]}}" controls="controls" class="el-image__inner" style="object-fit: contain;">
                            您的浏览器不支持 video 标签。
                        </video>
                    </div>
                </div>
            </div>
        </div>
        <div class="operation-btns text-xs text-center">
            <span class="openMaterialPreview" data-url="{{d.data[i]}}">查看</span>
        </div>
    </div>
    {{# } }}
    <input type="hidden" id="checkGallery_{{d.name}}" name="{{d.name}}" value="{{(d.data).join(',')}}"/>
</script>

